package com.wlz.processor;

import org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.stereotype.Component;

/**
 *  MergedBeanDefinitionPostProcessor 修改合并bean 的定义
 * @author wlz
 * @date 2022-05-24  10:33 下午
 */
@Component
public class MyMergedBeanDefinitionPostProcessor implements MergedBeanDefinitionPostProcessor {
	@Override
	public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {
		if ("a".equals(beanName)) {
		beanDefinition.setAttribute("a","a");
		}
	}
}
